package com.whli.autumn.mall.web.controller.convert.metadata;

import com.whli.autumn.mall.metadata.domain.dto.productcategory.ProductCategoryAddDTO;
import com.whli.autumn.mall.metadata.domain.dto.productcategory.ProductCategoryUpdateDTO;
import com.whli.autumn.mall.metadata.domain.entity.ProductCategory;
import com.whli.autumn.mall.metadata.domain.vo.productcategory.ProductCategoryVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>商品分类转换工具</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-04-09 09:32
 */
@Mapper
public interface ProductCategoryConvert {

    ProductCategoryConvert INSTANCE = Mappers.getMapper(ProductCategoryConvert.class);

    ProductCategory addToDomain(ProductCategoryAddDTO dto);

    ProductCategory updateToDomain(ProductCategoryUpdateDTO dto);

    ProductCategoryVO domainToVO(ProductCategory entity);

}
